<!doctype html>
<html>
<head>
  <title>Popup for Proxy API Test</title>
  <link href="./popup.css" type="text/css" rel="stylesheet">
</head>
<body>
  <h1>Proxy Configuration</h1>
  <div role="main">
    <form id="proxyForm">
      <fieldset id="system">
        <legend>System Settings</legend>
        <input type="radio" name="proxyType" id="proxyTypeSystem" value="system">
        <label for="proxyTypeSystem">Use the <em>system's proxy settings</em>.</label>
      </fieldset>
      <fieldset id="direct">
        <legend>Direct Connection</legend>
        <input type="radio" name="proxyType" id="proxyTypeDirect" value="direct">
        <label for="proxyTypeDirect">Your computer is <em>directly connected</em> to the internet; no need for a proxy.</label>
      </fieldset>
      <fieldset id="pac_script">
        <legend>Automatic Configuration</legend>
        <input type="radio" name="proxyType" id="proxyTypeAutoconfig" value="autoconfig">
        <label for="proxyTypeAutoconfig">Your proxy supports <em>automatic configuration</em>.</label>

        <section>
          <label for="autoconfigURL">Autoconfiguration URL (PAC file)</label>
          <input type="url" name="autoconfigURL" id="autoconfigURL">
          <input type="hidden" name="autoconfigData" id="autoconfigData">
        </section>
      </fieldset>
      <fieldset id="fixed_servers">
        <legend>Manual Proxy</legend>
        <input type="radio" name="proxyType" id="proxyTypeManual" value="manual">
        <label for="proxyTypeManual">Configure your proxy settings <em>manually</em>.</label>
        <section>
          <fieldset>
            <legend>HTTP</legend>
            <label for="proxyHostHttp">Host</label>
            <select id="proxySchemeHttp" name="proxySchemeHttp">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostHttp" id="proxyHostHttp">

            <label for="proxyPortHttp">Port</label>
            <input type="text" name="proxyPortHttp" id="proxyPortHttp" class="port">

            <input type="checkbox" name="singleProxyForEverything" id="singleProxyForEverything">
            <label for="singleProxyForEverything">Use the same proxy server for all protocols</label>
          </fieldset>
          <fieldset>
            <legend>HTTPS</legend>
            <label for="proxyHostHttps">Host</label>
            <select id="proxySchemeHttps" name="proxySchemeHttps">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostHttps" id="proxyHostHttps">

            <label for="proxyPortHttps">Port</label>
            <input type="text" name="proxyPortHttps" id="proxyPortHttps" class="port">
          </fieldset>
          <fieldset>
            <legend>FTP</legend>
            <label for="proxyHostFtp">Host</label>
            <select id="proxySchemeFtp" name="proxySchemeFtp">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostFtp" id="proxyHostFtp">

            <label for="proxyPortFtp">Port</label>
            <input type="text" name="proxyPortFtp" id="proxyPortFtp" class="port">
          </fieldset>
          <fieldset>
            <legend>Fallback</legend>
            <label for="proxyHostFallback">Host</label>
            <select id="proxySchemeFallback" name="proxySchemeFallback">
              <option selected value="http">http://</option>
              <option value="https">https://</option>
              <option value="socks4">socks4://</option>
              <option value="socks5">socks5://</option>
            </select>
            <input type="text" name="proxyHostFallback" id="proxyHostFallback">

            <label for="proxyPortFallback">Port</label>
            <input type="text" name="proxyPortFallback" id="proxyPortFallback" class="port">
          </fieldset>
          <fieldset>
            <label for="bypassList">Bypass proxy for these hosts:</label>
            <textarea id="bypassList" name="bypassList" placeholder="<local>,192.168.1.1/16, .example.com"></textarea>
          </fieldset>
        </section>
      </fieldset>
      <input type="submit" value="Save proxy settings">
      <button value="incognito">Configure incognito window settings.</button>
    </form>
  </div>
  <script src="./proxy_form_controller.js"></script>
  <script src="./popup.js"></script>
</body>
</html>
